cmake_minimum_required(VERSION 3.20)
project(demo)
set(CMAKE_CXX_STANDARD 17)
# 包含头文件路径
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
file(GLOB SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c)

message(${CMAKE_MODULE_PATH})
# message(${CMAKE_PREFIX_PATH})
# message(${CMAKE_FRAMEWORK_PATH})
# message(${CMAKE_APPBUNDLE_PATH})
message(${CMAKE_SYSTEM_PREFIX_PATH})

# set(calc_DIR ${CMAKE_CURRENT_SOURCE_DIR}/install)  # 替换为实际路径
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/install)
find_package(calc REQUIRED)

message(${calc_FOUND})
message(${calc_DIR})
message(${calc_FOUND})
message(${CMAKE_ROOT}) # /Applications/CMake.app/Contents/share/cmake-4.0


# 添加并生成一个可执行程序
add_executable(app ${SRC_LIST})
# 指定要链接的动态库
target_link_libraries(app PUBLIC calc::calc)